package com.example.springboot.design.First;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

@SuppressWarnings("desc")
public class BeanFactoryTest {

    public static void main(String[] args) {
        BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("springdemo.xml"));
        MyTest bean = (MyTest)beanFactory.getBean("myTest");
        System.out.println(bean.getTestStr()+"测试的数据");
    }
}
